<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" th:href="@{https://v3.bootcss.com/favicon.ico}">
<title>用户注册</title>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
<!-- Custom styles for this template -->
<link th:href="@{/css/signin.css}" rel="stylesheet">
<link
	th:href="@{https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css}"
	rel="stylesheet">
<link th:href="@{https://v3.bootcss.com/examples/signin/signin.css}"
	rel="stylesheet">
</head>
<body>

	<div class="container">

		<form class="form-signin" th:action="@{/register}" th:object="${user}"
			method="POST" enctype="utf8">
			<h2 class="form-signin-heading" th:text="注册"></h2>

			<label for="inputUserName" class="sr-only" th:text="用户名"></label> <input
				th:field="*{name}" type="text" id="inputUserName" name="username"
				class="form-control" th:placeholder="用户名" required="" autofocus="" />
			<p class="label label-danger" th:each="error: ${#fields.errors('name')}"
				th:text="${error}">Validation error</p>

			<label for="inputEamil" class="sr-only" th:text="邮箱"></label> <input
				type="email" th:field="*{email}" id="inputEmail" name="email"
				class="form-control" th:placeholder="邮箱" required="" autofocus="" />
			<p class="label label-danger" th:each="error : ${#fields.errors('email')}"
				th:text="${error}">Validation error</p>

			<label for="inputPassword" class="sr-only" th:text="密码"></label> <input
				type="password" th:field="*{passWd}" id="inputPassword"
				name="password" class="form-control" th:placeholder="密码" required="" />
			<p class="label label-danger" th:each="error : ${#fields.errors('passWd')}"
				th:text="${error}">Validation error</p>

			<label for="inputPassword" class="sr-only" th:text="重复密码"></label> <input
				type="password" th:field="*{matchPassWd}" id="inputRePassword"
				name="repassword" class="form-control" th:placeholder="确认密码"
				required="" autofocus="" />
			<p class="label label-danger" th:errors="*{matchPassWd}"></p>

			<button class="btn btn-lg btn-primary btn-block" type="submit">提交</button>
			<a th:href="@{/login}">登录</a> <br> <br> <a th:href="@{/}">返回首页</a>
		</form>


	</div>
	<!-- /container -->

</body>
</html>